import { createI18n } from 'vue-i18n';
import { App } from 'vue';
import en from './en';
import zh_CN from './zh_CN';

let lang = 'zh_CN';

const i18n = createI18n({
  legacy: false,
  locale: lang,
  globalInjection: true,
  messages: {
    en,
    zh_CN
  }
});

export default i18n;

export { i18n };

export const setupI18n = (app: App) => {
  app.use(i18n);
};
